﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SPMS.Log.Core
{
    /// <summary>
    /// 日志过滤器可连接口接口
    /// </summary>
    /// <remarks>用于将日志过滤器连接到特定的对象上</remarks>
    /// <history>
    /// [zanezeng]               2009/9/25 12:28    创建
    /// </history>
    public interface ILogFilterAttachable
    {
        #region ---Property

        /// <summary>
        /// 获得关联的所有日志过滤器
        /// </summary>
        /// <value>关联的所有日志过滤器</value>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]               2009/9/25 12:11    创建
        /// </history>
        ILogFilter[] Filters
        {
            get;
        }

        #endregion

        #region ---Method

        /// <summary>
        /// 添加日志过滤器
        /// </summary>
        /// <param name="filter">要添加的日志过滤器</param>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]               2009/9/25 12:12    创建
        /// </history>
        void AddFilter( ILogFilter filter );

        /// <summary>
        /// 删除指定日志过滤器
        /// </summary>
        /// <param name="filter">要删除的日志过滤器</param>
        /// <returns>
        /// 	<c>true</c>：删除成功<br/>
        /// 	<c>false</c>：删除失败
        /// </returns>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]               2009/9/25 12:14    创建
        /// </history>
        bool RemoveFilter( ILogFilter filter );

        /// <summary>
        /// 清除所有的日志过滤器
        /// </summary>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]               2009/9/25 12:17    创建
        /// </history>
        void ClearFilters();

        #endregion
    }
}
